import { Injectable } from '@angular/core';

import { Bearing } from  './bearing';
import { BEARING } from './mock-bearing';

let bearingsPromise = Promise.resolve(BEARING);

@Injectable()
export class BearingService {
	getBearing(){
		return bearingsPromise;
	};

	getSingleBearing(id: string){
		let bearing = BEARING.find(v => v.id === id);
		return Promise.resolve(bearing)
	};

	addBearing(){

	};
}